package com.zhuannimei.view;

import android.content.Context;

import com.zhuannimei.R;
import com.zhuannimei.dialog.BaseDialog;

/**
 * @fileName ZnmLoadingDialog.java
 * @package com.zhuannimei.view
 * @description  赚你妹的loading图
 * @author 大熊
 * @email 651319154@qq.com
 * @version 1.0
 *  
 */
public class ZnmLoadingDialog extends BaseDialog {
	
	private FlippingImageView mFivIcon;
	private HandyTextView mHtvText;
	private String mText;

	public ZnmLoadingDialog(Context context , String text) {
		super(context);
		mText = text;
		init();
	}
	
	private void init() {
		setContentView(R.layout.znm_loading_dialog);
		mFivIcon = (FlippingImageView) findViewById(R.id.loadingdialog_fiv_icon);
		mHtvText = (HandyTextView) findViewById(R.id.loadingdialog_htv_text);
		mFivIcon.startAnimation();
		mHtvText.setText(mText);
	}

	public void setText(String text) {
		mText = text;
		mHtvText.setText(mText);
	}

	@Override
	public void dismiss() {
		if (isShowing()) {
			super.dismiss();
		}
	}
}
